type LogDrain = (logger: Logger, level: string, ...data: unknown[]) => Promise<void>;
type LogLevel = 'trace' | 'debug' | 'info' | 'wait' | 'other' | 'event' | 'ready' | 'warn' | 'error';
interface CustomLevel {
    label: string;
    priority: number;
}
interface LoggerOptions {
    customLevels?: Record<string, CustomLevel>;
    drain?: LogDrain;
    enabled?: boolean;
    level?: LogLevel | string;
    maxEntries?: number;
    parent?: Logger;
    prefix?: string;
}
declare const DEBUG_MODE: boolean;
declare const ANSI_REGEX: RegExp;
declare class LogEntry {
    level: string;
    timestamp: Date;
    data: unknown[];
    constructor(level: string, data: unknown[]);
    message(): string;
}
/**
 * The logger class provides a simple and flexible logging system.
 *
 * ```ts
 * import { logger } from 'robo.js'
 *
 * // Can be used instead of console.log
 * logger.info('Hello, world!')
 * logger.debug('This is a debug message')
 * logger.warn('Warning: something is not right')
 * logger.error('An error occurred')
 *
 * // To make your own Logger instance
 * import { Logger } from 'robo.js'
 *
 * const customLogger = new Logger({
 * 	level: 'debug'
 * })
 * ```
 *
 * Use logger whenever possible instead of `console.log` to take advantage of Robo drains and log levels.
 *
 * [**Learn more:** Logger](https://robojs.dev/robojs/logger)
 */
declare class Logger {
    protected _customLevels: Record<string, CustomLevel>;
    protected _enabled: boolean;
    protected _level: LogLevel | string;
    protected _levelValues: Record<string, number>;
    protected _parent: Logger | undefined;
    protected _prefix: string | undefined;
    private _currentIndex;
    private _drain;
    private _logBuffer;
    constructor(options?: LoggerOptions);
    setup(options?: LoggerOptions): void;
    protected _log(prefix: string | null, level: string, ...data: unknown[]): void;
    /**
     * Waits for all pending log writes to complete.
     */
    flush(): Promise<void>;
    /**
     * Creates a new logger instance with the specified prefix.
     * This is useful for creating a logger for a specific plugin, big features, or modules.
     *
     * All writes and cached logs will be delegated to the parent logger, so debugging will still work.
     *
     * @param prefix The prefix to add to the logger (e.g. 'my-plugin')
     * @returns A new logger instance with the specified prefix
     */
    fork(prefix: string): Logger;
    getLevel(): LogLevel | string;
    getLevelValues(): Record<string, number>;
    getRecentLogs(count?: number): LogEntry[];
    setDrain(drain: LogDrain): void;
    trace(...data: unknown[]): void;
    debug(...data: unknown[]): void;
    info(...data: unknown[]): void;
    wait(...data: unknown[]): void;
    log(...data: unknown[]): void;
    event(...data: unknown[]): void;
    ready(...data: unknown[]): void;
    warn(...data: unknown[]): void;
    error(...data: unknown[]): void;
    custom(level: string, ...data: unknown[]): void;
}
declare function logger(options?: LoggerOptions): Logger;
declare namespace logger {
    var flush: () => Promise<void>;
    var fork: (prefix: string) => Logger;
    var getRecentLogs: (count?: number) => LogEntry[];
    var trace: (...data: unknown[]) => void;
    var debug: (...data: unknown[]) => void;
    var info: (...data: unknown[]) => void;
    var wait: (...data: unknown[]) => void;
    var log: (...data: unknown[]) => void;
    var event: (...data: unknown[]) => void;
    var ready: (...data: unknown[]) => void;
    var warn: (...data: unknown[]) => void;
    var error: (...data: unknown[]) => void;
    var custom: (level: string, ...data: unknown[]) => void;
}

export { ANSI_REGEX, DEBUG_MODE, LogDrain, LogLevel, Logger, LoggerOptions, logger };
